/*********************************************************************************************
 *
 *			Function to check for unmatching string2 from strnig						 *
 *
 ********************************************************************************************/
#include "mystrings.h"

int  mystrcspn ( const char * main , const char * sub)
{										/* subroutine to return the mismatching  count  */
	const char  * temp1  =  main ;		/* ptr to store address of strings */
	const char  * temp2  =  sub ;

	for  ( ; *temp1 ; temp1++) {
		for ( temp2 = sub  ; *temp1 != *temp2 && *temp2 != '\0' ; temp2++)

			;	
		//	printf (" %c ->%c \n",*temp1,*temp2 );


		if ( *temp1 == *temp2 )
			return (int) (temp1 - main) ;
	}
	return (int) (temp1 - main);
}

